package qyf.example.eurekaclientelsaticsearch.entity;

import org.springframework.beans.factory.FactoryBean;
import org.springframework.lang.Nullable;
import org.springframework.stereotype.Component;

import java.util.ArrayList;

@Component
public class MyFactoryBean implements FactoryBean<Article> {
    @Nullable
    @Override
    public Article getObject() throws Exception {
        return new Article();
    }

    @Nullable
    @Override
    public Class<?> getObjectType() {
        return Article.class;
    }

    @Override
    public boolean isSingleton() {
        return true;
    }

    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        int i = 0;
//        while (true){
//            list.add(String.valueOf(i++).intern());
//        }
    }
}
